
<html>

  <head>
    <meta charset="utf-8">
    <title id='title'>iphone</title>
    <link id='icon' rel="shortcut icon" href="lib/apple.png">
    <link rel="stylesheet" href="lib/material/material-components-web.min.css">
    <link rel="stylesheet" href="lib/material/material-icons.css">
    <link rel="stylesheet" href="lib/material/material-icons-outlined.css">
    <link rel="stylesheet" href="lib/material/material-icons-round.css">
    <link rel="stylesheet" href="lib/material/material-icons-sharp.css">
    <link rel="stylesheet" href="lib/material/material-icons-two-tone.css">
    <script src="lib/material/material-components-web.min.js"></script>
    <script src="lib/jswrt/py_full.js"></script>
  </head>

<body onload="start()" style="background-color:white">
  <script>
    function stdout(text) {
      if (text.trim()!='') console.log(text)
    }
    function stderr(text) {
      if (text.trim()!='') console.error(text)
    }
    function run(src) {
      let rt = create_jswrt()
      rt.start_and_run(null, stdout, stderr, src, null)

    }
    function start() {
      fetch('main.py').then(res => {
        if (res.status != 200) {
          console.error(res.statusText)
          return
        }
        res.text()
          .then(run)
          .catch(stderr)
      })
    }
  </script>

</body>

</html>
